@use "../includes/mixins" as *;
@use "../includes/themed" as *;
@use "../includes/themes" as *;
@use "../includes/themify" as *;

#tooltip {
  position: absolute;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  @include themify($themes) {
    background: themed('font-color');
    color: themed('background-highlight');
  }

  &[data-show] {
    opacity: 1;
  }

  #tooltip-arrow, #tooltip-arrow::before {
    position: absolute;
    width: 8px;
    height: 8px;
    background: inherit;
  }

  #tooltip-arrow {
    visibility: hidden;
  }

  #tooltip-arrow::before {
    visibility: visible;
    content: '';
    transform: rotate(45deg);
  }

  &[data-popper-placement^='top'] > #tooltip-arrow {
    bottom: -4px;
  }

  &[data-popper-placement^='bottom'] > #tooltip-arrow {
    top: -4px;
  }

  &[data-popper-placement^='left'] > #tooltip-arrow {
    right: -4px;
  }

  &[data-popper-placement^='right'] > #tooltip-arrow {
    left: -4px;
  }
}
